package com.xiaomage.ViewDraw16

import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.widget.LinearLayout
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        val myView=MyView(this)
        val params=LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.MATCH_PARENT,
                1000
        )
        myView.layoutParams=params
        val mask:MaskFilterView= MaskFilterView(this)
        mask.layoutParams=params
        ll_zong.addView(myView)
        ll_zong.addView(mask)
        bt_radius_add.setOnClickListener{
            myView.radiuAdd()
        }
        bt_dx_add_5.setOnClickListener{
            myView.dxAdd5()
        }
        bt_dy_add_5.setOnClickListener{
            myView.dyAdd5()
        }
        bt_clear_shadow.setOnClickListener{
            //方法1：
            //myView.clearShadow1()
            myView.clearShadow2()
        }
        bt_show_shadow.setOnClickListener{

        }
    }
}
